package com.ncu.cloundeoffice.controller;

import com.ncu.cloundeoffice.pojo.TAdmin;
import com.ncu.cloundeoffice.service.TAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/chat")
public class ChatController {

    @Autowired
    private TAdminService tAdminService;

    /**
     * 获取所有的操作员
     * @param keyword
     * @return
     */
    @GetMapping("/admin")
    public List<TAdmin> getAllAdmins(@RequestParam(value = "keyword",defaultValue = "") String keyword){
        return tAdminService.getAllTAdmins(keyword);
    }
}
